1. Field of the Invention
The present invention relates to an image processing method for processing image data generated by an image reading apparatus (e.g., an image scanner, a copying machine, or a multifunction peripheral).
2. Description of the Related Art
When a user copies a page of a book (or a magazine), the user typically lays the book face-down on a transparent platen of an image scanner or a copying machine so that a reading unit installed inside the apparatus body can read the spread document through the platen.
If the reading operation is performed in this manner, a binding portion (i.e., a region extending along the border of right and left pages) or each front edge (i.e., a free edge of each page opposed to the binding portion) of the book may be held in a floating state with a significant clearance from the platen.
As a result, an output image resulting from read image data may include a shadow of the binding portion or the front edge of a book. In particular, if characters are involved in a dark portion of an image, these characters may not be recognized correctly.
If a copying machine prints an image including image data causing dark portions, the copying machine may consume a large amount of toner or ink.
Although the clearance between the binding portion and the platen can be reduced by pressing a book along its backbone (a folding line), the book may be damaged when a strong force is applied by a user.
As another correction method, luminance distribution information of an image can be used to estimate a 3-dimensional shape (i.e., a floating state) of a document. For example, the “Shape from Shading” method is discussed in T. Wada, H. Uchida and T. Matsuyama, “Shape from Shading with Interreflections under a Proximal Light Source: Distortion-Free Copying of an Unfolded Book”, International Journal Computer Vision 24(2), p 125-135(1997).
However, the “Shape from Shading” method requires a long processing time for a great amount of calculations in the correction processing.
An image correction apparatus discussed in Japanese Patent Application Laid-Open No. 11-41455 can effectively perform a correction with a small calculation amount based on a 3-dimensional shape of a book estimated from the shape of a page contour line involved in a read image.
Furthermore, as discussed in Japanese Patent Application Laid-Open No. 2000-20682, the floating height of a binding portion at an upper end of a document placed on a platen may be different from the floating height at a lower end if a pressing force is unevenly applied to the document.
The correction method discussed in Japanese Patent Application Laid-Open No. 2000-20682 can correct shadows of top and bottom regions of a binding portion with reference to the shape of a page contour line which varies depending on the floating state of a document.
However, the shadow correction based on the shape of a page contour line requires a reducing optical system as an image reading apparatus and is only applicable to a binding portion extending in the aligning direction of pixels of a reading line sensor.
A method discussed in Japanese Patent Application Laid-Open No. 2003-152977 detects a shadow region as a sequence of points where the luminance changes, and determines whether a document image includes one page or two pages based on a comparison between the orientation of a text in the image and the direction of the detected shadow.
If it is determined that the document image does not include two pages, the method further determines whether the detected shadow is a target shadow of a binding portion (i.e., a shadow to be corrected) based on a comparison between features of the detected shadow and features of a peripheral shadow. If it is determined that the document image includes only one page, the method does not perform a correction.
A method discussed in Japanese Patent Application Laid-Open No. 2005-115768 identifies the hue of a background portion in document image data, and applies a luminance correction to a pixel having a hue similar to the identified hue of the background.
When a user places a book document (e.g., a book or a magazine) on a platen of a scanner, the user can select a vertical placement or a horizontal placement of the document as a preparatory operation prior to the correction processing applied to the shadow of a binding portion or a front edge. According the vertical placement, the binding portion of a book document is parallel to a sub scanning direction (i.e., a moving direction of a reading optical unit). According to the horizontal placement, the binding portion of a book document is parallel to a main scanning direction (i.e., an aligning direction of an image reading sensor).
A conventional correction method discussed in Japanese Patent Application Laid-Open No. 11-41455 restricts the placement of a book document to only one direction. A conventional correction method discussed in Japanese Patent Application Laid-Open No. 2003-152977 corrects the inclination of a book document before performing the correction processing.
A compact image reading apparatus has a small platen comparable to the Letter size. If the opening direction of a platen cover is restricted, a spread book document may not be laid in a designated direction. Therefore, the image reading apparatus may not be able to read spread pages of the book document and all contour lines of the document and may not be able to obtain appropriate correction results.
A magazine image or a color document image generally includes a surrounding of characters, such as design, pattern, photograph, etc. If a character/graphic region is different in color from the background, an image of the character/graphic region may include shadows resulting from the surrounding other than the characters.